<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								入金总额：<input type="text" name="inBalance"/>
							</li>

							<li>
								出金总额：<input type="text" name="outBalance"/>
							</li>

							<li>
								收益总额：<input type="text" name="getBalance"/>
							</li>

							<li>
								提现总额：<input type="text" name="txBalance"/>
							</li>

							<li>
								可提总额：<input type="text" name="txableBalance"/>
							</li>

							<li>
								冻结金额：<input type="text" name="usdtLocked"/>
							</li>

							<li>
								商户数：<input type="text" name="orderTotalNum"/>
							</li>

							<li>
								处理时长：<input type="text" name="orderTotalTime"/>
							</li>

							<li>
								异议单数：<input type="text" name="orderObjectionNum"/>
							</li>

							<li>
								仲裁单数：<input type="text" name="orderArbitrateNum"/>
							</li>

							<li>
								接单数：<input type="text" name="userTotalNum"/>
							</li>

							<li>
								额度：<input type="text" name="usdtQuota"/>
							</li>

							<li>
								使用额度：<input type="text" name="useQuota"/>
							</li>

							<li>
								更新时间：<input type="text" name="updateTime"/>
							</li>

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="pay:user:total:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="pay:user:total:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="pay:user:total:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="pay:user:total:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('pay:user:total:edit')}]];
        var removeFlag = [[${@permission.hasPermi('pay:user:total:remove')}]];
        var prefix = ctx + "pay/user/total";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "用户统计",
				search: false,
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'userTotalId', 
					title : '用户',
					visible: false
				},
				{
					field : 'inBalance', 
					title : '入金总额',
					sortable: true
				},
				{
					field : 'outBalance', 
					title : '出金总额',
					sortable: true
				},
				{
					field : 'getBalance', 
					title : '收益总额',
					sortable: true
				},
				{
					field : 'txBalance', 
					title : '提现总额',
					sortable: true
				},
				{
					field : 'txableBalance', 
					title : '可提总额',
					sortable: true
				},
				{
					field : 'usdtLocked', 
					title : '冻结金额',
					sortable: true
				},
				{
					field : 'orderTotalNum', 
					title : '商户数',
					sortable: true
				},
				{
					field : 'orderTotalTime', 
					title : '处理时长',
					sortable: true
				},
				{
					field : 'orderObjectionNum', 
					title : '异议单数',
					sortable: true
				},
				{
					field : 'orderArbitrateNum', 
					title : '仲裁单数',
					sortable: true
				},
				{
					field : 'userTotalNum', 
					title : '接单数',
					sortable: true
				},
				{
					field : 'usdtQuota', 
					title : '额度',
					sortable: true
				},
				{
					field : 'useQuota', 
					title : '使用额度',
					sortable: true
				},
				{
					field : 'updateTime', 
					title : '更新时间',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.userTotalId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.userTotalId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>